<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('办理情况页面')"/>
    <!--<th:block th:include="include :: select2-css" />-->
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">
    <link th:href="@{/css/iconfont/iconfont.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/qxEasyUI/themes/default/easyui.css}">


</head>
<style>
    label {
        font-weight: bold;
    }

    @font-face {
        font-family: 'huawen';
        src: url("/fonts/huawen.woff2");
    }
</style>

<body style="background-color: #FFFFFF; font-size: 13px;font-family:'huawen' ;font-weight: bold">
<div class="main-content" style="margin: 0;padding: 0;letter-spacing:2px;">

    <form id="form-user-add" class="form-horizontal" style="background-color: #F4F6FA">
        <input id="pkId" th:value="${wfId}" type="hidden"/>
        <div class="col-sm-12">
            <!--   回访记录     -->
            <div class="col-sm-12 tltieBoder">
                <div class="blueBorder"></div>
                <h4 style="margin:0 0 0 10px">办理情况</h4>
            </div>
            <div class="col-sm-12">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/ajax/libs/qxEasyUI/jquery.easyui.min.js}"></script>


<script>
    var mail = ctx + "system/wsMail";
    $(function () {
        let wfId = $('#pkId').val();
        //拟派电话工单列表
        var options = {
            url: mail + '/simulacrumList/' + wfId,
            sortName: "pkid",
            modalName: "派单",
            sortOrder: "desc",
            uniqueId: "pkId",
            removeUrl: mail + "/remove",
            showColumns: false,                  //是否显示所有的列（选择显示的列）
            showRefresh: false,
            showSearch: false,
            showToggle: false,
            fixedColumns: true,
            fixedNumber: 1,
            fixedRightNumber: 1,
            columns: [{
                field: 'pkId',
                title: 'id',
                visible: false
            },
                {
                    field: 'seqName',
                    title: '交办次序',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'sortName',
                    title: '办理性质',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'dealName',
                    title: '办理方式',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'sbdeptName',
                    title: '承办单位',
                    width: 240,
                    align: 'center',
                }, {
                    field: 'sdeptName',
                    title: '派发单位',
                    width: 240,
                    align: 'center',
                }, {
                    field: 'backLimit',
                    title: '要求期限',
                    width: 160,
                    align: 'center',
                }, {
                    field:'sendTime',
                    title:'派发时间',
                    align:'center',
                    width: 160
                }, {
                    field: 'sendState',
                    title: '办理情况',
                    align: 'center',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return fmtSBSendState(value, row, index);
                    }
                },{
                    field : 'wfId',
                    title: '操作',
                    width: 60,
                    align: 'center',
                    valign: 'middle',
                    formatter: actionFormatter
                }]
        };
        $.table.init(options);


    });

    function actionFormatter(value, row, index) {
        var id = value;
        var result = "";
        result += "<a href='javascript:;' class='btn btn-xs blue' onclick=\"sendBackDetail('"+row.pkId+"')\" title='编辑'><span>查看</span></a>";
        return result;
    }

    //查看办理情况详情
    function sendBackDetail(sbid){
        var url = "system/wsMail/mailDetail/"+sbid;
        var width = '70%';
        var height = '74%';
        var config = {
            title: '办理情况-详情',
            width: width,
            height : height,
            url: url,
            btn:['关闭'],
            skin: 'layui-layer-gray',
            yes: function (index, layero) {
                $.modal.close(index);
            }
        };
        $.modal.openOptions(config);
    }

</script>
</body>
</html>

